﻿using System;
using System.Collections.Generic;

public class Student
{
    public int Id { get; set; }
    public string Name { get; set; }
    public int Age { get; set; }

    public Student(int id, string name, int age)
    {
        Id = id;
        Name = name;
        Age = age;
    }
}

public class Class : IList<Student>
{
    private List<Student> _students = new List<Student>();
    public string ClassName { get; set; }

    public Class(string className)
    {
        ClassName = className;
    }

    public Student this[int index]
    {
        get => _students[index];
        set => _students[index] = value;
    }

    public int Count => _students.Count;

    public bool IsReadOnly => false;

    public void Add(Student item)
    {
        _students.Add(item);
    }

    public void Clear()
    {
        _students.Clear();
    }

    public bool Contains(Student item)
    {
        return _students.Contains(item);
    }

    public void CopyTo(Student[] array, int arrayIndex)
    {
        _students.CopyTo(array, arrayIndex);
    }

    public IEnumerator<Student> GetEnumerator()
    {
        return _students.GetEnumerator();
    }

    public int IndexOf(Student item)
    {
        return _students.IndexOf(item);
    }

    public void Insert(int index, Student item)
    {
        _students.Insert(index, item);
    }

    public bool Remove(Student item)
    {
        return _students.Remove(item);
    }

    public void RemoveAt(int index)
    {
        _students.RemoveAt(index);
    }

    System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
    {
        return GetEnumerator();
    }
}